package com.hebeiwangxiaozhang.user.service.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class TestController {

    @Autowired
    private RestTemplate innerRestTemplate;
    @RequestMapping("/hi")
    public String say(){
        return "hello!";
    }

    @RequestMapping("/in")
    public String in() {
        return innerRestTemplate.getForObject("http://oauth2-service/oauth/check_token?token=efa1f815-3e51-4421-bc60-5c89171fdc1d",String.class);
    }
}
